using System;
using System.Collections.Generic;
using System.Text;

namespace GHMC
{
	public class Output : IComparable<Output>
	{
		public int seed;
		public double tempStart;
		public double tempStep;
		public double tempStop;
		public double metropolis;
		public double StepLength;
		public int nRuns;
		public int ndim;
		public int nMin;
		public int Nmd;
        public int Nmc;
		public double without;
		public double with;
		public double bestCont;
		public int evaluations;
		public double distance;
		public int runnumber;

        public Output(int seedIn, double tempStartIn, double tempStepIn, double tempStopIn, double metropolisIn, int NmdIn, int NmcIn, double stepLengthIn, int nRunsIn, int ndimIn, int nMinIn, double withoutIn, double withIn, double bestContIn, int evaluationsIn, double distanceIn, int runnumberIn)
        {
			seed = seedIn;
			tempStart = tempStartIn;
			tempStep = tempStepIn;
			tempStop = tempStopIn;
			metropolis = metropolisIn;
            Nmd = NmdIn;
            Nmc = NmcIn;
			StepLength = stepLengthIn;
			nRuns = nRunsIn;
			ndim = ndimIn;
			nMin = nMinIn;
			without = withoutIn;
			with = withIn;
			bestCont = bestContIn;
			evaluations = evaluationsIn;
			distance = distanceIn;
			runnumber = runnumberIn;
        }
		public Output(int seedIn, double tempStartIn, double tempStepIn, double tempStopIn, double metropolisIn, int NmdIn, int NmcIn, double stepLengthIn, int nRunsIn, int ndimIn, double withoutIn, double withIn, int evaluationsIn, double distanceIn, int runnumberIn)
		{
			seed = seedIn;
			tempStart = tempStartIn;
			tempStep = tempStepIn;
			tempStop = tempStopIn;
			metropolis = metropolisIn;
			Nmd = NmdIn;
			Nmc = NmcIn;
			StepLength = stepLengthIn;
			nRuns = nRunsIn;
			ndim = ndimIn;
			without = withoutIn;
			with = withIn;
			evaluations = evaluationsIn;
			distance = distanceIn;
			runnumber = runnumberIn;

			nMin = 0;
		}



		#region IComparable<Output> Members

		public int CompareTo(Output other)
		{
			Output temp = other;
			if (this.tempStart > temp.tempStart)
			{
				return -1;
			}
			else if (this.tempStart < temp.tempStart)
			{
				return 1;
			}
			else
			{
				if (this.metropolis > temp.metropolis)
				{
					return -1;
				}
				else if (this.metropolis < temp.metropolis)
				{
					return 1;
				}
				else
				{
					if (this.Nmc > temp.Nmc)
					{
						return -1;
					}
					else if (this.Nmc < temp.Nmc)
					{
						return 1;
					}
					else
					{
						if (nMin != 0)
						{
							if (this.nMin > temp.nMin)
							{
								return -1;
							}
							else if (this.nMin < temp.nMin)
							{
								return 1;
							}
							else
							{
								return 0;
							}
						}
						else
						{
							return 0;
						}
					}
				}
			}
		}

		#endregion
	}
}
